package com.skku.selab.fl.ui;

import java.io.File;

import javax.swing.JFileChooser;

public class DirectoryChooser {
	  public File getSelectedDirectory() {
		  JFileChooser chooser = new JFileChooser();
		  File path = null;
		  chooser.setCurrentDirectory(new java.io.File("."));
		  chooser.setDialogTitle("choosertitle");
		  chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
		  chooser.setAcceptAllFileFilterUsed(false);
		    
		  if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
			  path = chooser.getSelectedFile();
		  } else {
			  System.out.println("No Selection ");
		  }
		  return path;
	  }
}
